<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/favicon.ico" >
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="__PUBLIC__/admin/lib/html5shiv.js"></script>
    <script type="text/javascript" src="__PUBLIC__/admin/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/static/h-ui.admin/css/style.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/main1.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="__PUBLIC__/admin/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <script type="text/javascript" src="__PUBLIC__/admin/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/admin/js/action.js"></script>

    <title>订单详情</title>
    <style>
        #picInput>input{
            display: block;
            margin: 10px;
        }
    </style>

</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 订单管理 <span class="c-gray en">&gt;</span> 订单详情
</nav>
<div class="page-container">
    <div class="ncap-order-details" style="width: 80%;">
            <div class="tabs-panels">
                <div class="addr-note">
                    <h3>收货信息</h3>
                    <dl>
                        <dt>收货人：</dt>
                        <dd><?php echo $detail['receiver'];?></dd>
                        <dt>联系方式：</dt>
                        <dd><?php echo $detail['mobile'];?></dd>
                    </dl>
                    <dl>
                        <dt>收货地址：</dt>
                        <dd><?php echo $detail['address'];?></dd>
                    </dl>
                </div>
                <div class="goods-info">
                    <h3>商品信息</h3>
                    <table>
                        <thead>
                        <tr>
                            <th >商品图片</th>
                            <th >商品名称</th>
                            <th>积分</th>
                        </tr>
                        </thead>
                        <tbody>
                            <tr class="text-c">
                                <td><img src="__DATA__/{$detail.goods.cover}" height="80px"/></td>
                                <td><?php echo $detail['goods']['name'];?></td>
                                <td>{$detail.point}</td>
                            </tr>
                        </tbody></table>
                </div>

                <div class="addr-note">
                    <h3>物流信息</h3>
                    <form action="{:U('updatePost')}" method="post" onsubmit="return postCheck();">
                    <dl>
                        <dt>发货快递：</dt>
                        <dd>
                            <select name="post_code">
                                <option value="0">请选择</option>
                                <?php foreach ($post as $key => $val) { ?>
                                <option value="<?php echo $key; ?>" <?php if($detail['post_code']==$key) { ?>selected="selected"<?php } ?> ><?php echo $val; ?></option>
                                <?php } ?>
                            </select>
                        </dd>
                        <dt>快递单号：</dt>
                        <dd>
                            <input name="post_num" value="<?php echo $detail['post_num'];?>">
                            <?php if($detail['status']>10) {?>
                            <!--<a href="checkWuliu?nu=<?php echo $detail['post_num']; ?>&code=<?php echo $detail['post_code']; ?>">查看物流</a>-->
                            <?php }else if($detail['status']==10){ ?>
                            <input type="submit" value="提交物流信息" style="margin-left: 70px; padding: 0 20px; height: 20px" class="btn btn-success" />
                            <input type="hidden" name="order_id" value="<?php echo $detail['id'];?>" />
                            <?php } ?>
                        </dd>
                    </dl>
                    </form>
                </div>
            </div>
    </div>

</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="__PUBLIC__/admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__PUBLIC__/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/lib/laypage/1.2/laypage.js"></script>
<script>
    function postCheck() {
        if($("input[name='post_num']").val() == ''){
            alert("请输入快递单号"); return false;
        }
        if($("select[name='post_code']").val() == 0){
            alert("请选择快递公司"); return false;
        }
    }
</script>
</body>
</html>
